<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<form:form commandName="taskMain" cssClass="form-horizontal" role="form" onsubmit="return false;" enctype="multipart/form-data" >
    <div class="form-group">
        <label class="control-label col-sm-2 text-right redTips">事项类型</label>
        <div class="col-sm-4">
            <select class="form-control redTips" required name="category">
                <option value="">请选择事项类型</option>
                <c:forEach items="${types}" var="type">
                    <option value="${type.sysId}">${type.category}</option>
                </c:forEach>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-2 text-right redTips">标题</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="title" required>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-2 text-right redTips">创建时间</label>
        <div class="col-sm-4">
                <%--creationTime--%>
            <input type="text" required class="form-control layui-input"  lay-verify="date" autocomplete="off" name="datetime" id="creationTime" readonly placeholder="请选择时间">
        </div>
        <label class="control-label col-sm-1 text-right redTips">周期</label>
        <div class="col-sm-4">
            <input type="number" required name="period" class="form-control" min="0" placeholder="请填写周期">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-2 text-right redTips">附件</label>
        <div class="col-sm-8 pos-rel">
            <div>
                <div style="display: inline-block">
                    <input type="file" class="fileBorder" id="fileupload">
                </div>
                <div style="display: inline-block">
                    <button class="btn btn-info" onclick="uploadFile(this,'weekDoc','weekDocName','fileupload','pdf')">
                        <span class="glyphicon glyphicon-open"></span>上传附件
                    </button>
                </div>
            </div>
        </div>
    </div>
</form:form>
<script src="<s:url value="/assets/js/chosen.jquery.js"></s:url>"></script>
<script src="<s:url value="/assets/js/ajaxfileupload.js"></s:url>"></script>
<script src="<s:url value="/assets/js/modal/modal.js"></s:url>"></script>
<script src="<s:url value="/assets/laydate/laydate.dev.js"></s:url>"></script>

<script type="text/javascript">
    $(document).on("click","#creationTime",function () {
        laydate({
            elem: this,
        });
    });
</script>
